package com.runtime;

import com.base.Constant;
import com.base.Sprite;
import com.util.ImageUtil;

import java.awt.Graphics;
import java.awt.Image;

public class StartButton extends Sprite {

    private Image image;

    public StartButton() {
        image = ImageUtil.get("sb");
        setX(Constant.WINDOW_WIDTH / 2 - image.getWidth(null) / 2);
        setY(Constant.WINDOW_HEIGHT / 2 - image.getHeight(null) / 2);
    }

    @Override
    public void draw(Graphics g) {
        g.drawImage(image, getX(), getY(), null);
    }
}
